﻿
#Region "Using Directives"
Imports System
Imports System.Collections.Generic
Imports System.Text
#End Region

Namespace C4F.DevKit.Bluetooth
    Namespace ServiceAndDeviceDiscovery

        ''' <summary>
        ''' Stores the value of an attribute of the service.
        ''' </summary>
        <System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices. _
                                                     LayoutKind.Explicit)> _
        Public Structure SdpUnion

            ''' <summary>
            ''' Value for type equals SdpTypeInt, value for specificType
            ''' equals SdpStInt128.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Int128Value As SdpLargeInteger16

            ''' <summary>
            ''' Value for type equals SdpTypeInt, value for specificType
            ''' equals SdpStInt164.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Int64Value As Long

            ''' <summary>
            ''' Value for type equals SdpTypeInt, value for specificType 
            ''' equals SdpStInt32.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Int32Value As Integer

            ''' <summary>
            ''' Value for type equals SdpTypeInt, value for specificType
            ''' equals SdpStInt16.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Int16Value As Short

            ''' <summary>
            ''' Value for type equals SdpTypeInt, value for specificType
            ''' equals SdpStInt8.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Int8Value As SByte
            ''' <summary>
            ''' Value for type equals SdpTypeUint, value for specificType
            ''' equals SdpStUint128.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Uint128Value As SdpUlargeInteger16

            ''' <summary>
            ''' Value for type equals SdpTypeUint, value for specificType 
            ''' equals SdpStUnit64.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Uint64Value As ULong

            ''' <summary>
            ''' Value for type equals SdpTypeUint, value for specificType equals
            ''' SdpStUnit32.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Uint32Value As UInteger

            ''' <summary>
            ''' Value for type equals SdpTypeUint, value for specificType equals
            ''' SdpStUnit16.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Uint16Value As UShort

            ''' <summary>
            ''' Value for type equals SdpTypeUint, value for specificType equals
            ''' SdpStUnit8.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Uint8Value As Byte

            ''' <summary>
            ''' Value for type equals SdpTypeBoolean.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public BooleanValue As Byte

            ''' <summary>
            ''' Value for type equals SdpTypeUuid, value for specificType equals
            ''' SdpStUuid128.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Uuid128Value As Guid

            ''' <summary>
            ''' Value for type equals SdpTypeUuid, value for specificType equals 
            ''' SdpStUuid32.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Uuid32Value As UInteger

            ''' <summary>
            ''' Value for type equals SdpTypeUuid, value for specificType equals 
            ''' SdpStUuid16.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public Uuid16Value As UShort

            ''' <summary>
            ''' Value for type equals SdpTypeString, which is a raw string buffer. 
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public SdpStringValue As Sdpstring

            ''' <summary>
            ''' Value for type equals SdpTypeUrl.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public UrlValue As Url

            ''' <summary>
            ''' Value for type equals SdpTypeSequence.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public SequenceValue As Sequence

            ''' <summary>
            ''' Value for type equals SdpTypeAlternative.
            ''' </summary>
            <System.Runtime.InteropServices.FieldOffset(0)> _
            Public AlternativeValue As Alternative

        End Structure
    End Namespace
End Namespace
